<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$months = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
    "Oct", "Nov", "Dec");
ini_set("date.timezone", "Europe/Paris");

for ($i = 0; $i < 12; $i++) {
    $dropdown_data[$i + 1] = $months[$i];
}
for ($i = 0; $i < 31; $i++) {
    $day_data[$i + 1] = $i + 1;
}

?>

<div id="wrapper-content">
    <table class="titrepage" width="100%">
        <tr>
            <td >Ajouter horoscope</td>
            <td align="right"> </td>
        </tr>
    </table>
<?php echo form_open_multipart('doggy_admin/add_horoscope') ?>
    <table width="100%" class="list">
        <tr>
            <td width="30%" >titre:</td>
            <td><input type="text" name="name" size="30" value="<?php echo set_value('name')?>"/></td>
            <td><?php echo form_error('name'); ?></td>
        </tr>
        <tr>
            <td><label >Image:</label></td>
            <td><input type="file" name="userfile" id="userfile" size="25"/></td>
        </tr>
        <tr>
            <td width="30%" >Description:</td>
            <td><textarea rows="10" cols="50" name="description" size="30" value="<?php echo set_value('description')?>"></textarea></td>
            <td><?php echo form_error('description'); ?></td>
        </tr>
        <tr>
            <td>Début </td>
            <td>
                J : <?php echo form_dropdown('start_date', $day_data, 1, 'id="start_date"'); ?>
                M : <?php echo form_dropdown('start_month', $dropdown_data, 1, 'id="start_month"'); ?>
            </td>
        </tr>
        <tr>
            <td>Fin </td>
            <td>
                J : <?php echo form_dropdown('end_date', $day_data, 1, 'id="end_date"'); ?>
                M : <?php echo form_dropdown('end_month', $dropdown_data, 1, 'id="end_month"'); ?>
            </td>
        </tr>
        <tr>
            <td><input type="submit" value=" Ajouter " name ="submit"/> </td>
        </tr>
    </table>

</div>